<?php if(!defined("HDPHP_PATH"))exit;C("SHOW_NOTICE",FALSE);?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
    <title>订单管理</title>
    <script type='text/javascript' src='http://127.0.0.1/damai/hdphp/hdphp/Extend/Org/Jquery/jquery-1.8.2.min.js'></script>
<link href='http://127.0.0.1/damai/hdphp/hdphp/../hdjs/css/hdjs.css' rel='stylesheet' media='screen'>
<script src='http://127.0.0.1/damai/hdphp/hdphp/../hdjs/js/hdjs.js'></script>
<script src='http://127.0.0.1/damai/hdphp/hdphp/../hdjs/js/slide.js'></script>
<script src='http://127.0.0.1/damai/hdphp/hdphp/../hdjs/org/cal/lhgcalendar.min.js'></script>
<script type='text/javascript'>
HOST = '<?php echo $GLOBALS['user']['HOST'];?>';
ROOT = '<?php echo $GLOBALS['user']['ROOT'];?>';
WEB = '<?php echo $GLOBALS['user']['WEB'];?>';
URL = '<?php echo $GLOBALS['user']['URL'];?>';
HDPHP = '<?php echo $GLOBALS['user']['HDPHP'];?>';
HDPHPDATA = '<?php echo $GLOBALS['user']['HDPHPDATA'];?>';
HDPHPTPL = '<?php echo $GLOBALS['user']['HDPHPTPL'];?>';
HDPHPEXTEND = '<?php echo $GLOBALS['user']['HDPHPEXTEND'];?>';
APP = '<?php echo $GLOBALS['user']['APP'];?>';
CONTROL = '<?php echo $GLOBALS['user']['CONTROL'];?>';
METH = '<?php echo $GLOBALS['user']['METH'];?>';
GROUP = '<?php echo $GLOBALS['user']['GROUP'];?>';
TPL = '<?php echo $GLOBALS['user']['TPL'];?>';
CONTROLTPL = '<?php echo $GLOBALS['user']['CONTROLTPL'];?>';
STATIC = '<?php echo $GLOBALS['user']['STATIC'];?>';
PUBLIC = '<?php echo $GLOBALS['user']['PUBLIC'];?>';
HISTORY = '<?php echo $GLOBALS['user']['HISTORY'];?>';
HTTPREFERER = '<?php echo $GLOBALS['user']['HTTPREFERER'];?>';
</script>
    <link href='http://127.0.0.1/damai/hdphp/hdphp/Extend/Org/bootstrap/css/bootstrap.min.css' rel='stylesheet' media='screen'>
<script src='http://127.0.0.1/damai/hdphp/hdphp/Extend/Org/bootstrap/js/bootstrap.min.js'></script>
                <!--[if lte IE 6]>
                <link rel="stylesheet" type="text/css" href="http://127.0.0.1/damai/hdphp/hdphp/Extend/Org/bootstrap/ie6/css/bootstrap-ie6.css">
                <![endif]-->
                <!--[if lt IE 9]>
                <script src="http://127.0.0.1/damai/hdphp/hdphp/Extend/Org/bootstrap/js/html5shiv.min.js"></script>
                <script src="http://127.0.0.1/damai/hdphp/hdphp/Extend/Org/bootstrap/js/respond.min.js"></script>
                <![endif]-->
    <style type="text/css">
        .plus_minus{
            width: 20px;
        }
    </style>
    <link type="text/css" rel="stylesheet" href="http://127.0.0.1/damai/./App/App/Admin/Tpl/Order/css/css.css"/>
</head>
<body>
<div class="wrap">
    <table class="table2">
        <thead>
            <tr pid=0>
                <td width="30"></td>
                <td> 订单号</td>
                <td>下单时间</td>
                <td>收货人</td>
                <td>总金额</td>
                <td>取票方式</td>
                <td>订单状态</td>
                <td width="200">操作</td>
            </tr>
        </thead>
        <tbody>
            <?php if(is_array($orderdata)):?><?php  foreach($orderdata as $k=>$v){ ?>
                <tr >
                    <td width="30"><a href="javascript:;" class="btn btn-primary btn-xs plus_minus">+</a></td>
                    <td><?php echo $v['ordernumber'];?></td>
                    <td><?php echo $v['ordertime'];?></td>
                    <td><?php echo $v['name'];?></td>
                    <td><?php echo $count;?></td>
                    <!-- 取票方式 -->
                    <?php if($v['spstatu'] == 0){?>
                    <td>电子票</td>
                    <?php  }elseif($v['spstatu'] == 2){ ?>
                    <td>快递</td>
                    <?php  }elseif($v['spstatu'] == 3){ ?>
                    <td>自取</td>
                    <?php }?>
                    <!-- 订单状态  -->
                    <?php if($v['stadus'] == 0){?>
                    <td>未付款</td>
                    <?php  }elseif($v['stadus'] == 1){ ?>
                    <td>已付款</td>
                    <?php  }elseif($v['stadus'] == 2){ ?>
                    <td>已发货</td>
                     <?php  }elseif($v['stadus'] == 3){ ?>
                    <td>已收货</td>
                    <?php }?>
                    <td width="250">
                        <a href="<?php echo U('Order/handle');?>" class="btn btn-primary btn-xs">设置订单状态</a>
                    <?php if($v['stadus'] == 0){?>
                        <a href="javascript:;" class="btn btn-info btn-xs">等待付款</a>
                        <?php  }elseif($v['stadus'] == 1){ ?>
                        <a href="<?php echo U('Order/email_goods',array('orderid'=>$v['orderid']));?>" class="btn btn-info btn-xs">发货</a>
                        <?php  }elseif($v['stadus'] == 2){ ?>
                        <a href="javascript:;" class="btn btn-info btn-xs">等待用户确认</a>
                         <?php  }elseif($v['stadus'] == 3){ ?>
                        <a href=":;" class="btn btn-info btn-xs">完成</a>
                     <?php }?>
                        <a href="javascript:;" class="btn btn-danger btn-xs" onclick="if(confirm('确定删除吗？')) location.href='<?php echo U('Category/del');?>'">删除</a>
                    </td>
                </tr>
            <?php }?><?php endif;?>
        </tbody>
    </table>
    <div class="page_hdjob">
        
    </div>
</div>

</body>
</html>


